@extends('layouts.website')
@section('title', \App\Models\SystemConfig::getConfigCache('seo_title'))
@section('content')
<div class="toppic">
    <div class="am-container-1">
        <div class="toppic-title left">
            <i class="am-icon-newspaper-o toppic-title-i"></i>
            <span class="toppic-title-span">新闻动态</span>
            <p>Hengwang News</p>
        </div>
        <div class="right toppic-progress">
            <span><a href="/" class="w-white">首页</a></span>
            <i class=" am-icon-arrow-circle-right w-white"></i>
            <span><a href="/news" class="w-white">新闻动态</a></span>
        </div>
    </div>
</div>
<div class="am-container-1 news-content-all">
    <div class="left am-u-sm-12 am-u-md-8 am-u-lg-9 ">
        <ul class="news-ul">
            @foreach ($articles as $article)
                <li class="am-u-sm-12 am-u-md-6 am-u-lg-4 ">
                    <a href="/news_info/{{$article->id}}">
                        <div class="news-ul-liall">
                            <img class="news-ul-liimg" src="{{ is_null($article->cover) !== false?$article->cover:'/images/config/default-img.jpg' }}" />
                            <div class="inform-list">
                                <div class="inform-list-date"><i class="am-icon-arrow-circle-right"></i>{{ $article->created_at }}</div>
                                <div class="inform-list-label"><i class="am-icon-arrow-circle-right"></i>{{ $article->keywords }}</div>
                                <div class="inform-list-numb"><i class="am-icon-arrow-circle-right"></i>点击次数：{{ $article->click }}</div>
                            </div>
                            <span>{{ $article->title }}</span>
                            <p>{{ $article->description }}</p>
                            <span class="see-more3">查看更多<i class="am-icon-angle-double-right"></i></span>
                        </div>
                    </a>
                </li>
            @endforeach
            <div class="clear"></div>
        </ul>
        <ul class="am-pagination ">
            <li><a href="{{ $articles->previousPageUrl() }}">&laquo;</a></li>
            <li><a href="{{ $articles->previousPageUrl() }}">上一页</a></li>
            <li><a class="current-page">{{$articles->currentPage()}}</a></li>
            <li><a href="{{ $articles->nextPageUrl() }}">下一页</a></li>
            <li><a href="{{ $articles->nextPageUrl() }}">&raquo;</a></li>
        </ul>
    </div>

    <div class="left am-u-sm-12 am-u-md-4 am-u-lg-3">
        <section data-am-widget="accordion" class="am-accordion am-accordion-gapped" data-am-accordion='{  }'>
            <div class="hot-title"><i class="am-icon-thumbs-o-up"></i>热门新闻 / Hot News</div>
            @foreach ($hotArts as $kh => $hot)
                <dl class="am-accordion-item @if($kh == 0) am-active @endif">
                    <dt class="am-accordion-title">
                        {{ $hot->title }}
                    </dt>
                    <dd class="am-accordion-bd am-collapse @if($kh == 0) am-in @endif">
                        <!-- 规避 Collapase 处理有 padding 的折叠内容计算计算有误问题， 加一个容器 -->
                        <div class="am-accordion-content">
                            {{ $hot->description }}
                        </div>
                    </dd>
                </dl>
            @endforeach
        </section>
    </div>
    <div class="clear"></div>
</div>
@endsection
